package br.edu.ufcg.lsd.wbis.ui.client.ui.loggedin.admin.user;

import br.edu.ufcg.lsd.wbis.ui.client.beans.UserInfo;
import br.edu.ufcg.lsd.wbis.ui.client.ui.loggedin.admin.home.info.UpdatePersonalInfoButtonListener;
import br.edu.ufcg.lsd.wbis.ui.client.ui.management.InfoManager;

import com.gwtext.client.widgets.TabPanel;
import com.gwtext.client.widgets.Toolbar;
import com.gwtext.client.widgets.ToolbarButton;

/**
 * @author Renato Miceli
 */
public class UserInfoPortletToolbar extends Toolbar {

	public UserInfoPortletToolbar(TabPanel centerPanel, UserInfoPortlet parentPortlet, InfoManager<UserInfo> infoManager, InfoManager<UserInfo> loggedInfoManager) {
		this.addFill();
		this.addButton(new ToolbarButton("Update user info", new UpdatePersonalInfoButtonListener(parentPortlet, infoManager, loggedInfoManager)));
		this.addSeparator();
		this.addButton(new ToolbarButton("Change password", new ChangeUserPasswordButtonListener(parentPortlet, infoManager, loggedInfoManager)));
		this.addSeparator();
		this.addButton(new ToolbarButton("Remove user", new RemoveUserButtonListener(centerPanel, infoManager, loggedInfoManager)));
	}

}
